package com.base.service.workflow.entity;

import com.base.core.framework.sql.entity.BaseV1Ext;
import com.base.service.workflow.bo.DeploymentBO;
import com.base.service.workflow.converter.DeploymentConverterEditor;
import com.gitee.magic.core.converter.PropertyConverter;
import com.gitee.magic.jdbc.persistence.annotation.Entity;
import com.gitee.magic.jdbc.persistence.annotation.Table;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.ColumnDef;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.Indexes;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.ScriptConverter;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.TableDef;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.indexes.Unique;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.converter.FieldMediumText;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author start 
 */
@Getter@Setter@ToString
@Entity("deployment")
@Table("wor_deployment")
@TableDef(comment = "流程部署")
public class DeploymentDO extends BaseV1Ext {

	private static final long serialVersionUID = 1L;
	
	public DeploymentDO(){}

	@ColumnDef(indexes = @Indexes(unique = @Unique),length = 64,comment = "流程KEY")
    private String processKey;

	@ColumnDef(length=128,comment = "名称")
	private String name;

	@PropertyConverter(DeploymentConverterEditor.class)
	@ColumnDef(comment = "XML数据")
    @ScriptConverter(FieldMediumText.class)
    private DeploymentBO content;

}
